package com.orange.core.pojo.enums;

import lombok.Getter;
import lombok.RequiredArgsConstructor;

/**
 * 支付状态
 */
@RequiredArgsConstructor
@Getter
public enum EPayStatus implements IDict {

    UNPAID(0, "未支付"),

    PAID(1, "已支付"),
    ;

    private final int value;
    private final String label;

    public static String getLabel(int value) {
        for (EPayStatus e : EPayStatus.values()) {
            if (e.value == value) {
                return e.label;
            }
        }
        throw new IllegalArgumentException("支付状态不存在");
    }
}
